<%@ page language="java" contentType="text/html; charset=UTF-8"%>


<!---------------------------------------头部模块复用------------------------------------------>
<%@ include file="/res/FrontPage/PartialPageReferences/head.jsp" %>

<title>办理信用卡</title>

<!-- -----------------------------------正文开始--------------------------------------- -->
<% if(session.getAttribute("users") == null){ %>
<script type="text/javascript">
	alert("请先登录哦~~~");
	window.location="/Bank/WebPage/FrontPage/CreditCardPage/CreditCard.jsp";
</script>
<%}else{ %>
<section class="contact_page">
    <div class="container">
        <div class="row">
            <div class="col-sm-6 col-sm-offset-3 m-t-50">
                <h2 class="underline heading">我的信用卡</h2>
                <h4 class="text-center">信用卡详细信息</h4>
                
                <table border=’1’ cellspacing=’0’ cellpadding=’5’ class="table table-striped table-bordered table-hover table-condensed">
								<tr><th align="center"> 信用卡ID </th><th align="center"> 信用卡类型 </th><th align="center"> 信用卡申请时间 </th><th align="center"> 信用卡操作 </th></tr>
								<%
									DAO dao = new DAO();
									String sql = "select * from creditcard where accountNumber = '" + ((Users)session.getAttribute("users")).getZhanghao() + "'";
									ArrayList<CreditCard> list = new ArrayList<CreditCard>();
									CreditCard cunqv = new CreditCard();
									list = dao.chaxunCreditCard(sql);
									Collections.reverse(list);
								%>
								<% for(CreditCard cc : list){ %>
								<tr><td align="center"><%= cc.getId() %></td><td align="center"><%= cc.getType() %></td><td align="center"><%= cc.getDate() %></td><td align="center"><button class="btn btn-success">修改</button><button class="btn btn-danger">删除</button></td></tr>
								<% //if(i>=10) break; %>
								<% } %>
				</table>
                <a href="/Bank/WebPage/FrontPage/CreditCardPage/CreditCard.jsp" class="text-success text-center">点击返回信用卡</a>
            </div>
        </div>

        <div class="row section-top-25">
            <div class="col-xs-12">
                <div class="map"></div>
            </div>
        </div>
    </div>
</section>
<%} %>
<!-- -----------------------------------正文结束--------------------------------------- -->

<!------------尾部顶端的两个角------------>
<div class="shape section-top-50"></div>
<!-----------------------------尾部页面复用------------------------------------->

<%@ include file="/res/FrontPage/PartialPageReferences/foot.jsp" %>